"use client";
import { usePathname } from 'next/navigation';
import styles from './navbarlink.module.css';
import Link from 'next/link';

const NavbarLink = ({item}) => {

    const path = usePathname()
  return (
    <Link href={item.href} className={`${styles.container} ${path === item.href? styles.active : ''}`}>
        {item.name}
    </Link>
  )
}

export default NavbarLink;